<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreateCarServicesTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('car_services', function (Blueprint $table) {
            $table->id();
            $table->string('name')->nullable()->comment('服务名称');
            $table->decimal('price',10,2)->default(0.00)->comment('服务价格');
            $table->text('introduction')->nullable()->comment('简介');
            $table->tinyInteger('status')->default(1)->comment('1为启用，0为停用');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('car_services');
    }
}
